<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>登录日志基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/systemStatic/style/admin.css">
    <link rel="stylesheet" href="${ctx}/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/css/public.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
</head>
<body>

<script type="text/html" template>
    <form class="layui-form"  requrl="{{ serverPath.systemPath + layui.setter.sysLinkPath}}sysLoginLog/get" style="padding: 0px 30px;width: 440px;margin-left: auto;margin-right: auto" lay-filter="sysLoginLogDataForm">

        <div style="margin: 15px 0px;height: 340px;overflow: auto;">
            <div class="layui-form-item">
                <label class="layui-form-label">登录人名称</label>
                <div class="layui-input-block">
                    <input type="text" name="userName"  placeholder="登录人名称"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="userName" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录账号</label>
                <div class="layui-input-block">
                    <input type="text" name="account"  placeholder="登录账号"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="account" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录人组织</label>
                <div class="layui-input-block">
                    <input type="text" name="orgName"  placeholder="登录人组织"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="orgName" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录时间</label>
                <div class="layui-input-block">
                    <input type="text" name="logintime"  placeholder="登录时间"
                           autocomplete="off" class="layui-input dateTimeFiled time-init datetimes" maxlength="50" fieldname="logintime" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录IP</label>
                <div class="layui-input-block">
                    <input type="text" name="ip"  placeholder="IP"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="ip" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-block">
                    <input type="text" name="note"  placeholder="描述"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="note" disabled>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div style="text-align: center;">
                <button type="reset" id="closeWindow" class="layui-btn btn-n layui-btn-danger btn-save">关闭</button>
            </div>
        </div>
    </form>
</script>

<script src="${ctx}/public/component.js" type="text/javascript"></script>
<script src="${ctx}/layui/layui.js"></script>

<script>

    layui.config({
        base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index','common','laydate','jquery'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var dateTimeFiledLen = $(".dateTimeFiled");
        for(var i=0;i<dateTimeFiledLen.length;i++){
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                ,type: 'date'
                ,trigger: 'click'
            });
        }

        //关闭当前页面
        $("#closeWindow").click(function () {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        })

        var common = layui.common;
        common.updateForm({
            name:'sysLoginLogDataForm',
            idValue:"${id}",
            primary:"id",
            updateCallback:function (data) {
                if (common.filterRecord(data)) {
                    window.parent.layer.alert(data.msg, function() {
                        window.parent.layer.close(window.parent.index);
                        if(window.parent.parent.layui.index){
                            window.parent.parent.layui.index.render();
                        }else{
                            parent.location.reload();
                        }
                    });
                } else {
                    window.parent.layer.alert(data.msg);
                }
                return false;
            }
        });
    });
</script>
